package com.yuelan.apartment.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @description:
 * @Author: ZhaoYi
 * @date: 24-6-29 20:07
 */

@Data
@TableName("apa_notice")
public class Notice implements Serializable {

    @TableField("id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull
    private Long id;

    @TableField("user_id")
    @NotNull
    private Long userId;

    @TableField("title")
    @NotNull
    private String title;

    @TableField("content")
    @NotNull
    private String content;

    @TableField("create_time")
    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField("update_time")
    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}
